#ifndef _META_DATA_SVR_CLIENT_PROTO_HELPER_H_
#define _META_DATA_SVR_CLIENT_PROTO_HELPER_H_

#include <string>
#include <vector>

#include "MetadataSvrClient.h"

using std::string;
using std::vector;

string mds_build_request_create_md_file(int32_t dir_id, int64_t file_id);
string mds_build_request_delete_md_file(int32_t dir_id, int64_t file_id);
string mds_build_request_get_md_file_info(int32_t dir_id, int64_t file_id);
string mds_build_request_data_svr_notify_data_file_info(int32_t dir_id, int64_t file_id, int data_svr_id, int64_t file_size, \
							vector<uint32_t> crcs, int delete_flag, int notify_reason);
string mds_build_request_client_notify_client_data_info(int32_t dir_id, int64_t file_id, vector<uint32_t> crcs);
string mds_build_request_alloc_ds_4_new_file();

int mds_parse_response_create_md_file(const char * response, int & result);
int mds_parse_response_delete_md_file(const char * response, int & result);
int mds_parse_response_get_md_file_info(const char * response, int & result, MD_FILE_INFO & info);
int mds_parse_response_data_svr_notify_data_file_info(const char * response, int & result);
int mds_parse_response_client_notify_client_data_info(const char * response, int & result);
int mds_parse_response_alloc_ds_4_new_file(const char * response, int & result, int32_t & ds_id, int32_t & dir_id, \
						int64_t & file_id);



#endif
